/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.example.touch.communication.entities;

import java.util.ArrayList;
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.ElementList;
import org.simpleframework.xml.ElementListUnion;

/**
 *
 * @author krist_000
 */
public class ActionList {

    
    public enum ActionExecutionType {
        sequential,
        parallel
    }
    
    @Attribute
    private String id;
    
    @Attribute(name = "event")
    private String eventID;
    
    @ElementListUnion({
        @ElementList(name = "playSound", type = PlaySound.class, inline = true),
        @ElementList(name = "playMedia", type = PlayMedia.class, inline = true),
        @ElementList(name = "Vibrate", type = Vibrate.class, inline = true),
        @ElementList(name = "notification", type = Notification.class, inline = true)
    })
    private ArrayList<Action> actions;

    @Attribute
    private ActionExecutionType type;

    public ActionExecutionType getType() {
        return type;
    }

    public void setType(ActionExecutionType type) {
        this.type = type;
    }

    public ArrayList<Action> getActions() {
        return actions;
    }

    public void setActions(ArrayList<Action> actions) {
        this.actions = actions;
    }
        
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getEventID() {
        return eventID;
    }

    public void setEventID(String eventID) {
        this.eventID = eventID;
    }


}
